//定义全局变量
var findtype=0;
$.ajaxSetup({
    headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}
});
//搜索事件
function page(page) {
        $.ajax({
            type: 'POST',
            url: '/xrdt',
            data: {typeid: findtype,searchstatus:1,page:page,servertype:2},
            success: function (res) {
                if (res)
                {
                    $("#searchbox").html(res)
                }
            }
        });
}
function  searchtype(e) {
    $(e).siblings().removeAttr('class');//去除同级元素的class
    $(e).attr('class','active');
    findtype = $(e).attr('value');
	page();
}